export function prettyFormatNumber(num) {
  const units = ['次', '万', '亿'];
  if (num < 10000) {
    return num + '次';
  } else {
    let unitIndex = 0;
    while (num >= 10000 && unitIndex < units.length - 1) {
      num /= 10000;
      unitIndex++;
    }
    return num.toFixed(unitIndex === 0 ? 0 : 1) + units[unitIndex];
  }
}
